import random
from damagecount import attack_damage

# 攻击——反击伤害列表
list1 = [0, 1, 1, 2, 2, 3, 3, 4, 4, '大']
list2 = [0, 0, 0, 1, 1, 1, 2, 2, 3, '大']

str1 = "甲" #对战双方角色名
str2 = "乙"

atk1=220    #对战双方攻击力基础值
atk2=180

attackpoint1=atk1+random.randint(1,100)     #【1d100】价值后的攻击力最终值
attackpoint2=atk2+random.randint(1,100)

strwin = "拼点胜者"
strlose = "拼点败者"
# 判断攻击力大小
if attackpoint1 > attackpoint2:
    strwin = str1
    strlose = str2
elif attackpoint1 < attackpoint2:
    strwin = str2
    strlose = str1
else:
    print("双方出力相同，平局")

# 如果攻击力不同则输出结果和调用攻击伤害计算函数
if attackpoint1 != attackpoint2:
    print(f"{str1}出力【{atk1}+1d100={attackpoint1}】,{str2}出力【{atk2}+1d100={attackpoint2}】 {strwin}胜出")
    print(attack_damage(list1, list2, strwin, strlose))




